<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
        .module-content1 {
            clear: both;
            line-height: 24px;
            padding: 10px;
        }
    </style>
    <style>
        .yellowish-btn,.yellowish-btn:hover{
            box-shadow: none;
            background: #f18d05;
            color: white!important;
            text-shadow: none;
            border: none;
            height: 27.6px;
            font-size: 12px;
            line-height: 27.6px;
            padding: 0px 20.48px;
            margin: 0;
            text-decoration: none;
            text-align: center;
            cursor: pointer;
            width: 100px;
        }
    </style>
</head>
<div class="module">

    <div id="post-sku-alert" class="board-alert-large" style="padding-top: 15px;padding-left: 52px; padding-bottom: 10px; margin-left: 25px;">
        <h4> 设置店铺名称可以设置多个店铺</h4>
        <!--<a  href="http://www.mlieasy.com/seller/SellerDetail?sellerId=41" target="_blank">什么是店铺名称</a>!-->
    </div>
    <div id="div_shopkeeperName" class="module-content1">
        <label class="module-name">
            <a name="product-title">&nbsp;</a><span class="required">店铺名称：</span></label>
        <input type="text" name="RoleName" id="RoleName" maxlength="" style="width: 200px" value="{$info.name}" />
        <a rel="title" title='店铺名称' class="help-tip" tabindex="-1" href="javascript:void(0);">店铺名称</a>
    </div>
    <div class="module-error" name="pt-err-shopkeeperName">
        <p id="pt-err-RoleName" style="display: none;" class="err-tip msg-err">
            店铺名称不能为空!
        </p>
    </div>
    <div id="div_shopkeeperName" class="module-content1">
        <label class="module-name">
            <a name="product-title"></a><span class="">备注：</span></label>
        <input type="text" name="Remark" value="{$info.remark}" id="Remark" style="width: 200px" />
        <a rel="title" title='页面Controllers' class="help-tip" tabindex="-1" href="javascript:void(0);">Controllers</a>
    </div>
    <input type="hidden" name="id" value="{$info.id}" id="dataId"/>
    <button onclick="Post()" id="btn-submit" class="yellowish-btn" type="button" style="margin-left: 170px">提交</button>
</div>
<script type="text/javascript">
    function Post() {
        var name = $("#RoleName").val();
        var remark = $("#Remark").val();
        var id = $('#dataId').val();
        if (!name) {
            $("#pt-err-RoleName").show();
            return;
        }
        $.ajax({
            url: "__SELF__",
            type: "post",
            dataType: "json",
            data: {
                id: id,
                name: name,
                remark: remark
            },
            success: function (data) {
                if (data.status == 1) {
                    layer.alert(data.info, 1, function () {
                        $.get("{:U('Store/storeList')}", "", function (data) {
                            $("#ManageProductListView").html(data); //这里是重点，右侧数据获取后要显示到div中
                        }, "text");
                        layer.closeAll();
                    })
                } else {
                    layer.alert(data.info, 3, function () {
                        layer.closeAll();
                    })

                }
            }
        })

    }
</script>

